Generation Capacity for Netherlands

The following ipython notebook will demonstrate how to access and download data from the ENTSO-E Transparency Platform.

We have created this short guide following a query on twitter from @pinkpoedel and @Sustainable2050 regarding installed generation capacity in the Netherlands. @Sustainable2050 posted a nice graphic from energy-charts.de. We are going to produce something similar for the Netherlands.

The Transparency platform has been running since the beginning of 2015 as such we can only analyse data from 01.01.2015 onwards.

How do we get the data?

Head over to the transparency platform and look for the generation tab. In the drop down you should look for the Installed Capacity per Production Type link.

Next you should select the Country tab at the top of the page.

You will then be presented with a view similar to the one below.

tp.png

You now need to scroll down the left hand menu until you see the Netherlands. Select this.

Using the menu on the top right you can select the range of years you would like to examine.

years

Downloading the data

Now that we have found the data we want we can now download it in a number of formats.

We are going to download the table as a CSV file, so that we can work with it in python and pandas easily.

  1. First you need to Register for an account
  2. Return to our previous view of Installed capacity in the Netherlands (handy link)
  3. Click export data -> Choose Export to CSV
  4. Save the csv in the same folder you wish to run your ipython notebook.

Now for the easy bits of code.

Notes

This notebook uses the following packages for python

  • Python 3.5
  • Ipython - for the notebook
  • Pandas - managing the table data
  • plot.ly and cufflinks - for the plots

Loading the packages

In [2]:
# first we will setup plot.ly so we can use it offline
import plotly as py
py.offline.init_notebook_mode()
In [3]:
import pandas as pd
import numpy as np

# cufflinks provides some hand wrappers for jumping straight from a pandas dataframe to a plotly plot.
import cufflinks as cf
cf.go_offline() # makes sure cufflinks doesn't look for api key

Reading in the data

In [4]:
cap = pd.read_csv('installed_capacity_nl.csv')
In [5]:
# let's see what the table looks like
cap.head()
Out[5]:
Production Type 2015 [MW] 2016 [MW]
0 Biomass 400 398
1 Fossil Brown coal/Lignite 0 0
2 Fossil Coal-derived gas 0 0
3 Fossil Gas 19590 19914
4 Fossil Hard coal 7270 5658
In [6]:
cap.tail()
Out[6]:
Production Type 2015 [MW] 2016 [MW]
16 Solar 1000 1429
17 Waste 869 674
18 Wind Offshore 228 357
19 Wind Onshore 2646 3284
20 Total Grand capacity 33213 32238

We see that there is a grand total row at the bottom of the table.

We don't want this as it will mess up our final plot.

In [7]:
# this will set the index of the table to the production type rather than a number
cap.set_index('Production Type', inplace=True)
In [8]:
# remove the grand total from the list
cap_nl = cap[:20]
In [9]:
cap_nl.T.iplot(kind="bar", barmode="stack", title="Installed Capacity per Production Type",
                yTitle="MW")
Drawing...

That's very nice looking but what if we want to only show the types of generation that are used in the Netherlands.

We can see that some generation types we do not need to show.

In [10]:
nl_only = cap_nl[cap_nl['2015 [MW]'] > 0]
In [11]:
nl_only.T.iplot(kind="bar", barmode="stack", title="Installed Capacity per Production Type",
                yTitle="MW")
Drawing...

Want to know more

If you would like to find our more about using python and pandas for data analysis you should have a look at the pandas tutorials

You can also contact me directly at colin.broderick@entsoe.eu